﻿@model IEnumerable<MVCBootStrapShell_WithTheme.Models.Page>

@{
    ViewBag.Title = "Index";
}

@{ 
    Html.RenderPartial("_PageSearchForm");
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

@*<div id="page-data">
    @Html.DisplayForModel(Model)
</div>*@

<table class="table" id="page-data">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.PageType)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Title)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.SubTitle)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Keywords)
            </th>
            <th></th>
        </tr>

    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.PageType)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.SubTitle)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Keywords)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id=item.PageID }) |
                @Html.ActionLink("Details", "Details", new { id=item.PageID }) |
                @Html.ActionLink("Delete", "Delete", new { id=item.PageID })
            </td>
        </tr>
    }

    </table>
